home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / comm / net / drexxmail.lha / elmsendmail.rexx < prev    next >
OS/2 REXX Batch file  |  1994-09-30  |  1KB  |  59 lines

  1. /* sendmail.rexx ... script to fudge "sendmail" for DNET,          */
  2. /* Version 1.03, by Rick Taylor, 7-20-94                           */
  3. /* Version 3.00 - Just uses different names for                    */
  4. /*                GRn/AmigaElm/Send_Mail                           */
  5.  
  6.  
  7. /* Thanks to Joe Rumsey for suggesting using 'putfiles'            */
  8.  
  9. /* ELM's */
  10.  
  11. MailFile = ARG(1)
  12. options results
  13. lf = '0a'x
  14. cr = '0d'x
  15. address command
  16.  
  17. /* If the proper dshrexx isn't running, start it.  Else go on */
  18. /* We want to make sure there's some way to get commands to   */
  19. /* the UNIX side                                              */
  20.  
  21. portok = show('p','ELMDNETMAIL.01')
  22. if portok = 0 then 'run <nil: >nil: dnet:dshrexx 8195 0 ELMDNETMAIL' 
  23. waitforport ELMDNETMAIL.01
  24. waitforport ELMDNETMAIL.01
  25.  
  26. /* Copy the mail file */
  27.  
  28. 'copy' Mailfile "t:elmrsm.mail QUIET"
  29.  
  30. /* Put the file in your unix directory */
  31.  
  32. 'dnet:putfiles <NIL: >NIL: t:elmrsm.mail'
  33.  
  34. /* Tell UNIX to send it now ... then delete the temp file on UNIX */
  35.  
  36. address 'ELMDNETMAIL.01'
  37. rxinit
  38. "raw"
  39. "send stty -echo" lf
  40. getln
  41.  
  42. /* NOTE: Check this path to see if it's correct for your UNIX host */
  43.  
  44. "send /usr/lib/sendmail -t < elmrsm.mail"lf
  45. getln
  46. "send rm elmrsm.mail"lf
  47. getln
  48.  
  49. /* Log this dshrexx out - we don't need it hanging around wasting space */
  50.  
  51. "send logout"lf
  52.  
  53. /* Good night, Gracie */
  54.  
  55. address command
  56. 'delete t:elmrsm.mail QUIET'
  57. exit
  58.  
  59.